<%--
  Created by IntelliJ IDEA.
  User: Zmt
  Date: 2015/12/10
  Time: 15:53
  To change this template use File | Settings | File Templates.
--%>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2015/12/14
  Time: 14:24
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<div id="data_list">
    <div class="searchBar">

        <div class="cnd1-3">
            <span class="label">文件名称</span>

            <div class="inputContainer">
                <input id="name" class="inputStyles" data-options="validType:'length[0,32]'"/>
            </div>
        </div>

        <div class="cnd1-3">
            <span class="label">文件类型</span>

            <div class="inputContainer">
                <select id="type" class="inputStyles" name="type">
                    <option value=></option>
                    <c:forEach var="type" items="${obj.typeDrop}" varStatus="index">
                        <option value=${type.value}>${type.name}</option>
                    </c:forEach>
                </select>
            </div>
        </div>

        <div class="cnd1-3">
            <span class="label">版本号</span>

            <div class="inputContainer">
                <input id="code" class="inputStyles"/>
            </div>
        </div>

        <div class="cnd1-8">
            <a class="searchButton" onclick="searchData()">搜索</a>
        </div>

        <div class="top_fr">
            <a href="#" class="prev prevImg" onclick="prevPage($('#top_current_page'),'${base}/data',4,$('#data_list'),${obj.this_page},${obj.queryReturn.pageSum})"></a>
            <input id="top_current_page" class="centerInput" value="${obj.this_page}"/>
            /<input id="top_count_page" class="centerInput" readonly="readonly" value="${obj.queryReturn.pageSum}">
            <a href="#" class="next nextImg" style="float: right" onclick="nextPage($('#top_current_page'), '${base}/data',4,$('#data_list'),${obj.this_page},${obj.queryReturn.pageSum})"></a>
        </div>
    </div>

    <div>
        <table class="new_datagrid" id="data_dg" style="width:100%; height:auto;">
            <thead>
            <tr>
                <th width="10%">版本名称</th>
                <th width="10%">版本号</th>
                <th width="10%">上一版本号</th>
                <th width="15%">版本描述</th>
                <th width="10%">文件名称</th>
                <th width="10%">文件类型</th>
                <th width="15%">
                    <a class="new_btn new_btn_back" onclick="create()">新增</a>
                    <a class="new_btn new_btn_back" style="visibility: hidden" onclick="create()">新增</a>
                </th>
                <th width="5%"></th>
                <th width="10%"></th>
            </tr>
            </thead>
            <tbody>
            <c:forEach var="data" items="${obj.queryReturn.rows}" varStatus="index">
                <tr>
                    <td>${data.vName}</td>
                    <td>${data.vCode}</td>
                    <td>${data.pvCode}</td>
                    <td>${data.vDesc}</td>
                    <td>${data.name}</td>
                    <td>${data.typeName}</td>
                    <td>
                        <a class="new_btn edit_btn_back" onclick="modifyData(${data.id})">编辑</a>
                        <a class="new_btn edit_btn_back" onclick="downloadData(${data.id})">下载</a>
                    </td>
                    <td>
                        <a class="delImg" onclick="deleteData(${data.id})"></a>
                    </td>
                    <td></td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
        <div class="fr">
            <a href="#" class="prev prevImg" onclick="prevPage($('#current_page'),'${base}/data',4,$('#data_list'),${obj.this_page},${obj.queryReturn.pageSum})"></a>
            <input id="current_page" class="centerInput" value="${obj.this_page}"/>
            /<input id="count_page" class="centerInput" readonly="readonly" value="${obj.queryReturn.pageSum}">
            <a href="#" class="next nextImg" style="float: right" onclick="nextPage($('#current_page'), '${base}/data',4,$('#data_list'),${obj.this_page},${obj.queryReturn.pageSum})"></a>
        </div>
    </div>
</div>

